<script>
  //进图判断token是否存在
  let isLogin = localStorage.getItem("token");
  console.log(isLogin);
  if (!isLogin) {
    location.href = "./login.html";
  }
</script>
<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8" />
    <meta
      name="viewport"
      content="width=device-width, initial-scale=1, maximum-scale=1"
    />
    <title>layout 后台大布局 - Layui</title>
    <link rel="stylesheet" href="./assets/lib/layui/css/layui.css" />
    <link rel="stylesheet" href="./assets/css/index.css" />
  </head>

  <body class="layui-layout-body">
    <div class="layui-layout layui-layout-admin">
      <div class="layui-header">
        <div class="layui-logo">后台管理系统</div>
        <ul class="layui-nav layui-layout-right">
          <li class="layui-nav-item">
            <a href="javascript:;">
              <img src="#" class="layui-nav-img" />
              黑马
            </a>
          </li>
          <li class="layui-nav-item">
            <a id="logout-btn" href="javascript:;">退了</a>
          </li>
        </ul>
      </div>

      <div class="layui-side layui-bg-black">
        <div class="layui-side-scroll">
          <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
          <ul class="layui-nav layui-nav-tree" lay-filter="test">
            <li class="layui-nav-item layui-this">
              <a href=""><span class="iconfont icon-home"></span>首页</a>
            </li>
            <li class="layui-nav-item">
              <a class="" href="javascript:;">用户管理</a>
              <dl class="layui-nav-child">
                <dd>
                  <a target="iframeArea" href="./user/user.html">用户列表</a>
                </dd>
                <dd>
                  <a target="iframeArea" href="./user/add.html">添加用户</a>
                </dd>
              </dl>
            </li>
            <li class="layui-nav-item">
              <a href="javascript:;">资源管理</a>
              <dl class="layui-nav-child">
                <dd>
                  <a target="iframeArea" href="./link/link.html">友情链接</a>
                </dd>
                <dd>
                  <a target="iframeArea" href="./swiper/swiper.html">轮播图</a>
                </dd>
                <dd>
                  <a target="iframeArea" href="./comment/comment.html"
                    >评论管理</a
                  >
                </dd>
              </dl>
            </li>
          </ul>
        </div>
      </div>

      <div class="layui-body">
        <!-- 内容主体区域 -->
        <iframe name="iframeArea" src="./home/home.html"></iframe>
      </div>

      <div class="layui-footer">
        <!-- 底部固定区域 -->
        © www.itheima.com - 黑马程序员
      </div>
    </div>
    <script type="text/javascript" src="./assets/lib/jquery.js"></script>
    <script
      type="text/javascript"
      src="./assets/lib/jquery.particleground.min.js"
    ></script>
    <script type="text/javascript" src="./assets/js/common.js"></script>
    <script
      type="text/javascript"
      src="./assets/lib/layui/layui.all.js"
    ></script>
    <script type="text/javascript" src="./assets/js/index.js"></script>
  </body>
</html>
